#pragma once
#ifndef PARENT_H
#define PARENT_H

#include "spa_types.h"
#include <map>
#include <vector>

class Parent
{
public:

	Parent();
	~Parent();

	void InsertParent(const STMT parent_statement, const STMT child_statement);
	
	STMT_ARRAY GetChild(const STMT parent_statement);
	STMT GetParent(const STMT child_statement);
	
	STMT_ARRAY RetrieveTransitiveChild(const STMT parent_statement);
	STMT_ARRAY RetrieveTransitiveParent(const STMT child_statement);
	STMT_ARRAY RetrieveTransitiveParent(const STMT child_statement, const NODETYPE parent_node_type);

	BOOLEAN IsParent(const STMT statement);

private:

	map<STMT, STMT_ARRAY> parent_table;
	map<STMT, STMT> child_table;
};

#endif